package org.codefinger.dao.util;

public class IdentityCache<K, V> extends AbstractCache<K, V> {

	public IdentityCache(ValueBuilder<K, V> builder) {
		super(builder);
	}

	public IdentityCache(int tableSize, ValueBuilder<K, V> builder) {
		super(tableSize, builder);
	}

	@Override
	protected boolean equals(K key, K target) {
		return key == target;
	}

	@Override
	protected int hash(K key) {
		return System.identityHashCode(key);
	}

}
